\hypertarget{classfw_time}{
\section{fwTime Class Reference}
\label{classfw_time}\index{fwTime@{fwTime}}
}


Time management and measurement.  


{\ttfamily \#include $<$fwTime.h$>$}\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static double \hyperlink{classfw_time_a44cc7f4ba1e352a8cab2c66d5c29a0fd}{measureTimeSecond} ()
\item 
static double \hyperlink{classfw_time_aab94873e39568574fb997df48da58dbc}{measureTimeMs} ()
\item 
static double \hyperlink{classfw_time_acfa52e44b20ca6232a04d39ba00f215d}{measureTimeMicros} ()
\item 
static int \hyperlink{classfw_time_a171ce4018faf8f1c0872a5547ae42dde}{wait} (double t0, double t)
\item 
static void \hyperlink{classfw_time_a475ceba3bd47e276e5462b0362e1a0ca}{wait} (double t)
\item 
\hypertarget{classfw_time_aee44b70ffd019f3ad90a5686e6b1537a}{
static double {\bfseries measureTimeSecond} ()}
\label{classfw_time_aee44b70ffd019f3ad90a5686e6b1537a}

\item 
\hypertarget{classfw_time_afcbe21f71a6d98eb5ce753c9863bbf3f}{
static double {\bfseries measureTimeMs} ()}
\label{classfw_time_afcbe21f71a6d98eb5ce753c9863bbf3f}

\item 
\hypertarget{classfw_time_a08fee10d6816c940176c113df2f382f1}{
static double {\bfseries measureTimeMicros} ()}
\label{classfw_time_a08fee10d6816c940176c113df2f382f1}

\item 
\hypertarget{classfw_time_ac3c27933da36eb330127755789cd75f5}{
static int {\bfseries wait} (double t0, double t)}
\label{classfw_time_ac3c27933da36eb330127755789cd75f5}

\item 
\hypertarget{classfw_time_a27bed290ba5bd89659b6260567b5f062}{
static void {\bfseries wait} (double t)}
\label{classfw_time_a27bed290ba5bd89659b6260567b5f062}

\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classfw_time_a185940719c85d52d1c7993b9dff835ea}{
static double {\bfseries minTimeForUsleepCall} = 4}
\label{classfw_time_a185940719c85d52d1c7993b9dff835ea}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Time management and measurement. 

\subsection{Member Function Documentation}
\hypertarget{classfw_time_acfa52e44b20ca6232a04d39ba00f215d}{
\index{fwTime@{fwTime}!measureTimeMicros@{measureTimeMicros}}
\index{measureTimeMicros@{measureTimeMicros}!fwTime@{fwTime}}
\subsubsection[{measureTimeMicros}]{\setlength{\rightskip}{0pt plus 5cm}double fwTime::measureTimeMicros ()\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classfw_time_acfa52e44b20ca6232a04d39ba00f215d}
Return the time in microseconds.

\begin{DoxySeeAlso}{See also}
\hyperlink{classfw_time_aab94873e39568574fb997df48da58dbc}{measureTimeMs()}, \hyperlink{classfw_time_a44cc7f4ba1e352a8cab2c66d5c29a0fd}{measureTimeSecond()} 
\end{DoxySeeAlso}
\hypertarget{classfw_time_aab94873e39568574fb997df48da58dbc}{
\index{fwTime@{fwTime}!measureTimeMs@{measureTimeMs}}
\index{measureTimeMs@{measureTimeMs}!fwTime@{fwTime}}
\subsubsection[{measureTimeMs}]{\setlength{\rightskip}{0pt plus 5cm}double fwTime::measureTimeMs ()\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classfw_time_aab94873e39568574fb997df48da58dbc}
This time is in milli-\/seconds. Threshold to activate usleep() in waiting methods (see \hyperlink{classfw_time_a171ce4018faf8f1c0872a5547ae42dde}{wait()}). This threshold is needed, because usleep() is not accurate on many machines. Call sleep() functions during the time to wait minus fwTime::minTimeForUsleepCall. The rest of the time to wait is managed by a while loop.

Return the time in milliseconds.

\begin{DoxySeeAlso}{See also}
\hyperlink{classfw_time_acfa52e44b20ca6232a04d39ba00f215d}{measureTimeMicros()}, \hyperlink{classfw_time_a44cc7f4ba1e352a8cab2c66d5c29a0fd}{measureTimeSecond()} 
\end{DoxySeeAlso}
\hypertarget{classfw_time_a44cc7f4ba1e352a8cab2c66d5c29a0fd}{
\index{fwTime@{fwTime}!measureTimeSecond@{measureTimeSecond}}
\index{measureTimeSecond@{measureTimeSecond}!fwTime@{fwTime}}
\subsubsection[{measureTimeSecond}]{\setlength{\rightskip}{0pt plus 5cm}double fwTime::measureTimeSecond ()\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classfw_time_a44cc7f4ba1e352a8cab2c66d5c29a0fd}
Return the measured time in seconds.

\begin{DoxySeeAlso}{See also}
\hyperlink{classfw_time_aab94873e39568574fb997df48da58dbc}{measureTimeMs()} 
\end{DoxySeeAlso}
\hypertarget{classfw_time_a475ceba3bd47e276e5462b0362e1a0ca}{
\index{fwTime@{fwTime}!wait@{wait}}
\index{wait@{wait}!fwTime@{fwTime}}
\subsubsection[{wait}]{\setlength{\rightskip}{0pt plus 5cm}void fwTime::wait (double {\em t})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classfw_time_a475ceba3bd47e276e5462b0362e1a0ca}
Wait t miliseconds from now.

The waiting is done by a call to usleep() if the time to wait is greater than fwTime::minTimeForUsleepCall.


\begin{DoxyParams}{Parameters}
\item[{\em t}]: Time to wait in ms. \end{DoxyParams}
\hypertarget{classfw_time_a171ce4018faf8f1c0872a5547ae42dde}{
\index{fwTime@{fwTime}!wait@{wait}}
\index{wait@{wait}!fwTime@{fwTime}}
\subsubsection[{wait}]{\setlength{\rightskip}{0pt plus 5cm}int fwTime::wait (double {\em t0}, \/  double {\em t})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classfw_time_a171ce4018faf8f1c0872a5547ae42dde}
Wait t miliseconds after t0 (in ms).

The waiting is done by a call to usleep() if the time to wait is greater than fwTime::minTimeForUsleepCall.


\begin{DoxyParams}{Parameters}
\item[{\em t0}]: reference time (in ms) \item[{\em t}]: time to wait (in ms)\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 : The function did wait. 

1 : The time was already over, no need to wait. 
\end{DoxyReturn}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/cv/ext/fw1394/include/fw/fwTime.h\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/cv/ext/fw1394/src/tools/time/fwTime.h\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/cv/ext/fw1394/src/tools/time/\hyperlink{fw_time_8cpp}{fwTime.cpp}\end{DoxyCompactItemize}
